package 类加载顺序;

public class MyClassA {
    private static MyClassA classA = new MyClassA();
    private static int a = 0;
    private static int b;

    public MyClassA() {
        a++;
        b++;
        System.out.println("init a==" + a);
        System.out.println("init b==" + b);

    }

    public static MyClassA getInstance() {
        return classA;
    }

    public static int getA() {
        return a;
    }

    public static int getB() {
        return b;
    }
}


